﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;

namespace ShowSystem
{
    class HistoryPhotos : OneFrame2D
    {
        int moveNum;
        public HistoryPhotos(Texture2D texture,Vector2 initPos,int num,string introduce,Color color)
            : base(texture)
        {
            this.texture = texture;
            this.Position = initPos;
            this.moveNum = num;
            this.Word = introduce;
            this.WordColor = color;
        }
        public HistoryPhotos(Texture2D texture, Vector2 initPos, int num)
            : base(texture)
        {
            this.texture = texture;
            this.Position = initPos;
            this.moveNum = num;
        }


        public override void Update(GameTime gameTime)
        {
            switch (moveNum )
            {
                case 0:
                    Position =new Vector2 (Position .X + 2f,Position .Y );
                    break;
                case 1:
                    Position = new Vector2(Position.X, Position.Y + 2f);
                    break;
            }

            WordPosition = new Vector2(Position.X + this.FrameSize.X / 2 - this.Word.Length * 4f, Position.Y - 20f);

            base.Update(gameTime);
        }

    }
}
